home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / programming / blitzbasic / blitz-list200994.lha / blitz-list / 000068_blitz-list-request_Sun Jul 17 17:34:30 1994.msg < prev    next >
Internet Message Format  |  1994-09-20  |  3KB

  1. Received: from relay.surfnet.nl (relay.surfnet.nl [192.87.36.2]) by kantti.helsinki.fi (8.6.9/8.6.5) with SMTP id RAA04137 for <blitz-list@helsinki.fi>; Sun, 17 Jul 1994 17:33:36 +0300
  2. Received: from aixserv.hsbos.nl by relay.surfnet.nl with SMTP (PP) 
  3.           id <24575-0@relay.surfnet.nl>; Sun, 17 Jul 1994 16:33:31 +0200
  4. Received: from ms1.hsbos.nl by aixserv.hsbos.nl (AIX 3.2/UCB 5.64/4.03) 
  5.           id AA37996; Sun, 17 Jul 1994 16:30:03 +0200
  6. Received: from MS1/MAILQUEUE by ms1.hsbos.nl (Mercury 1.12);
  7.           Sun, 17 Jul 94 16:32:38 GMT-1DFT
  8. Received: from MAILQUEUE by MS1 (Mercury 1.12); Sun, 17 Jul 94 16:32:14 GMT-1DFT
  9. From: "j.valks" <j.valks@hsbos.nl>
  10. To: blitz-list@helsinki.fi
  11. Date: Sun, 17 Jul 1994 16:23:06
  12. Subject: Sending
  13. Priority: normal
  14. X-Mailer: PMail v3.0 (R1a)
  15. Message-Id: <1E265C87BBD@ms1.hsbos.nl>
  16. MIME-Version: 1.0
  17. Content-Type: text/plain; charset="us-ascii"
  18. Content-Transfer-Encoding: 7bit
  19. X-Status: 
  20. Status: RO
  21.  
  22.  
  23. Hi all,
  24.  
  25. I'll need your help. I'm writing a program what reads binary(!) data 
  26. from the serial port. This data is send by a PC and can be a program 
  27. , IFF pictures, etc. The size of the data is everytime 80 chars.
  28. What I need is a good way to handle this data. How do I write the 
  29. data to a file ??? I tried this simpele program to test:
  30.  
  31. If OpenFile(0,"hd0:dm2")
  32.   If OpenFile(1,"ram:test")
  33.     MaxLen buf$=80
  34.     l.l=Lof(0)
  35.     whole.l=l/80
  36.     rest.l=l MOD 80
  37.     MaxLen rest$=rest
  38.     For tel.l=1 To whole
  39.       FileInput 0
  40.       buf$=Edit$(80)
  41.       FileOutput 1
  42.       Print buf$;
  43.     Next tel
  44.     FileInput 0
  45.     rest$=Edit$(rest)
  46.     FileOutput 1
  47.     Print rest$;
  48.     CloseFile 1
  49.     CloseFile 0
  50.   EndIf
  51. EndIf
  52. DefaultOutput
  53. NPrint "Done..."
  54. MouseWait:End
  55.  
  56. But it doesn't work! the final size is smaller! I think it has 
  57. something to do with the 'strange' ascii characters in the file.
  58.  
  59. I made the program on the PC side in Visual Basic and it has a 
  60. good file handling because you can choose between several file modes 
  61. in one command. If you use the binary mode, you have to define a 
  62. string variabel as a buffer.
  63.  
  64. But how do I do this in Blitz!
  65.  
  66. PLEASE HELP, MAYBE SOMEBODY FROM ACID ???????????????????????
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75. Greetings from:
  76.  
  77. ----------------------------------------------------------------------
  78. Jurgen Valks, working at HTO 's-Hertogenbosch in The Netherlands
  79.  
  80. Email: j.valks@hsbos.nl
  81.  
  82. Systems: Amiga 2000, 4Mb, 49Hd working as a fileserver
  83.          Amiga 1200, 6Mb, 120Hd 68030 40Mhz.
  84.          PC 486-DX33, 8mb, 210Hd
  85.          
  86. Working on: Amiga: Hero 2094 (HERO conversion from the CBM64)
  87.                    Blitz2 AmigaGuide file
  88.             PC   : Diropus for PC
  89.             
  90. ----------------------------------------------------------------------
  91.             
  92.